[#ftl]

[#if args.view??]

	[#assign view = args.view]

[#else]

	[#assign view = 'feed']

[/#if]

[#if s?? && s.error??]
        <div class="results">${s.error}</div>
[#else]

	[#import "/org/alfresco/confluence/util/ws.utils.ftl" as wsutils]

	[#if s?? && s.nodes??]
			
		[#if view ='activities']
			[@wsutils.activities s.nodes/]
		[/#if]	

	[#elseif s?? && s.json??]

		[#if view ='profile']
			[@wsutils.profile s.json endpoint endpointurl/]
		[/#if]	
	
	[#else]
		[#if view ='keyword']
			<div class="results">[@wsutils.keyword s.response endpoint/]</div>
		[#else]
			<div class="results">${s.response}</div>
		[/#if]
	[/#if]

[/#if]